//
//  DocumentsViewController.h
//  Documents
//
//  Created by Alex Di Mango 
//  Copyright (c) 2012 Whardoo.com -  All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "DocumentThumbView.h"
#import "NSObject+PDFThumb.h"
#import "MasterScrollView.h"

@interface DocumentsViewController : UIViewController <UIWebViewDelegate>{
    NSArray *_itemDocList;
    NSMutableArray *_itemFolderList;
    int webViewLoads_;
}
@property (retain, nonatomic) IBOutlet MasterScrollView *masterView;
@property (retain, nonatomic) NSNumber *idFolder;
@property (retain, nonatomic) NSNumber *idDoc;
@property (retain, nonatomic) NSArray *itemDocList;
@property (retain, nonatomic) NSMutableArray *itemFolderList;
@property (retain, nonatomic) UIPopoverController *infoPopover;
@property (retain, nonatomic) UILabel *freeSpaceLabel;
@property (retain, nonatomic) UIWebView *thumbWebView;
@property BOOL loadedThumbWebView;
@property (nonatomic, strong) UIActivityIndicatorView *activityView;
@property (retain, nonatomic) UIToolbar *docToolbar;

@property (retain, nonatomic) IBOutlet UIButton *markedImage;
@property (retain, nonatomic) IBOutlet UIImageView *selectedImage;
@property (retain, nonatomic) IBOutlet UIImageView *selectedImageRef;
@property (retain, nonatomic) IBOutlet UILabel *selectedType;
@property (retain, nonatomic) IBOutlet UILabel *selectedUpdatedate;
@property (retain, nonatomic) IBOutlet UILabel *selectedSize;
@property (retain, nonatomic) IBOutlet UILabel *selectedTitle;
@property (retain, nonatomic) IBOutlet UIButton *tagColor1;
@property (retain, nonatomic) IBOutlet UIButton *tagColor2;
@property (retain, nonatomic) IBOutlet UIButton *tagColor3;
@property (retain, nonatomic) IBOutlet UIButton *tagColor4;
@property (retain, nonatomic) DocumentThumbView *selectedBorder;

@property (nonatomic, retain) NSURL *uploadDocumentPath;
@property (nonatomic, retain) MyDocument *uploadDocument;
@property (nonatomic,retain)MyDocumentsFolder *selectedFolder;
@property (nonatomic,retain)MyDocumentsFolder *currentFolder;
@property (nonatomic, retain) MyDocument *selectedDocument;
@property (nonatomic, assign) BOOL didEnterBackground;
@property (nonatomic, assign) BOOL didUrlOpening;
@property (nonatomic, assign) BOOL didDragged;
@property (nonatomic, assign) BOOL isScrolling;
@property BOOL loadedWebView;


- (void)handleSingleTap:(UITouch *)touch;
-(void)setSideFolder:(MyDocumentsFolder *)folder;

@end
